home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cchh01.arc / IOS1.H < prev    next >
C/C++ Source or Header  |  1986-03-14  |  1KB  |  56 lines

  1. /**
  2. *
  3. * The following structure is a UNIX file block that retains information about
  4. * a file being accessed via the level 1 I/O functions.
  5. */
  6. struct UFB
  7. {
  8. char ufbflg;        /* flags */
  9. #if MSDOS1
  10. char ufbtyp;        /* device type */
  11. #endif
  12. #if MSDOS
  13. int ufbfh;        /* file handle */
  14. #if MSDOS1
  15. struct FCB ufbfcb;    /* file control block */
  16. #endif
  17. #else
  18. struct FAB
  19.     {
  20.     struct FCB fcb;        /* file control block */
  21.     char wf;        /* buffer write flag */
  22.     long fpos;        /* file position */
  23.     long eof;        /* end of file */
  24.     long peof;        /* previous end of file */
  25.     unsigned bn;        /* block number */
  26.     char b[128];        /* block buffer */
  27.     }
  28.     ufbfcb;
  29. #endif
  30. };
  31. #define NUFBS 20    /* number of UFBs defined */
  32.  
  33. /*
  34. *
  35. * UFB.ufbflg definitions
  36. *
  37. */
  38. #define UFB_OP 0x80    /* file is open */
  39. #define UFB_RA 0x40    /* reading is allowed */
  40. #define UFB_WA 0x20    /* writing is allowed */
  41. #define UFB_NT 0x10    /* access file with no translation */
  42. #define UFB_AP 8    /* append mode flag */    
  43. /*
  44. *
  45. * UFB.ufbtyp definitions
  46. *
  47. */
  48. #if MSDOS1
  49. #define D_DISK 0
  50. #define D_CON 1
  51. #define D_PRN 2
  52. #define D_AUX 3
  53. #define D_NULL 4
  54. #endif
  55.  
  56.